﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WgFrame.Utils;
using WgFrame.Net;

public class Item
{
    /// <summary>
    /// id
    /// </summary>
    public int TableId { get; set; }
    /// <summary>
    /// 数量
    /// </summary>
    public int Count { get; set; }

    public long Id { get; set; }

    public Item()
    {

    }

    public Item(Hashtable data)
    {
        TableId = (int)data[(byte)1];
        Count = (int)data[(byte)2];
        Id = (long)data[(byte)3];
    }

    public bool TryGetStaticInfo(out InitItem initItem)
    {
        return InitItemMgr.Dict.TryGetValue(TableId, out initItem);
    }
}
